#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int chu = 2;
  while (chu * chu <= n) {
    if (n % chu == 0) {
      n = n / chu;
    } else {
      chu++;
    }
    if (chu > 5) {
      cout << "Irregular Number";
      return 0;
    }
  }
  if (n > 5) {
    cout << "Irregular Number";
    return 0;
  }

  cout << "Regular Number";

  return 0;
}